home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
science
/
sm32a.zip
/
SYMBMATH.H03
< prev
next >
Wrap
Text File
|
1994-03-29
|
21KB
|
478 lines
2.9 Editor and Edit help menu
SymbMath includes a multi-windowed text editor for creating
and modifying program files. Usage of the editor is similar to
WordStar in nondocument mode, to Borland's SideKick, or to Borland's C
compiler.
You can execute the edit commands either by selecting the edit
commands in the Edit Help menu or by keystrokes.
2.9.1 Edit Help Menu
Open the Edit Help menu by pressing <F1> within the Input window,
the Aux Edit window, or the Help window.
This menu has 11 choices:
---------------------------
| Show help file |
| Cursor movement |
| Insert & Delete |
| Searching |
| Block functions |
| Special block functions |
| File functions |
| Application keys |
| Miscellaneous |
| Global functions |
| Hot keys |
---------------------------
Except for the first choice of the "Show help file", others have their
own sub-menu. You can select the edit command in the sub-menu by the
up or down key and <Enter>.
2.9.1.1 Show Help File
This command opens a help window to show a help file.
2.9.1.2 Cursor movement commands
This command opens a menu for cursor movement commands.
The functionality of most of the cursor-movement commands is straight-
forward. In this section, only the "non-obvious" commands will be
explained.
Scroll Up
The text scrolls one line up. The cursor will be at same physical line on
the computer-screen.
Scroll Down
The text scrolls one line down. The cursor will be at the same physical
line on the computer-screen.
Previous Position
Moves the cursor to its position just prior to the last command. For
instance, if you inadvertently press Goto Texrstart, moving your cursor
to the top of the file, you can press Previous Position to get back to
where you were.
Goto Line
Moves the cursor to the line number you specify.
Goto Position
The position is the number of characters from the textstart. Newlines and
tabs ars both counted as one character.
Goto Blockstart
Moves the cursor to the block-begin marker that you already have set with
Mark blockstart. The command works even if the block is not displayed (see
"Hide/display block" under "Block Commands"), or if the block-end marker
is not set.
Goto Blockend
Moves the cursor to the block-end marker that you have alread set with
Mark Blockend. The command works even if the block is not displayed (see
"Hide/desplay block") or the block-begin marker is not set.
2.9.1.3 Insert and delete commands
To write a program, you need to know more than just how to move the cursor
around. You also need to be able to insert and delete text. The following
commands insert and delete characters, words, and lines. You can also
insert blocks of text from other files-- refer to "The Auxiliary Editor"
later in this chapter.
Insert line
Inserts a line break at the cursor position.
Backspace - delete character left of cursor
Moves one character to the left and deletes the character positioned there.
Any characters to the right of the cursor move one position to the left.
You can use this command to remove line breaks.
Delete character under cursor
Deletes the character under the cursor and moves any characters to the right
of cursor one position to the left. This command works across line breaks,
and can be used to remove them.
Delete word right of cursor
Deletes the word to the right of the cursor. A word is defined as a sequence
of characters delimited by one of the following characters:
space < > , ; . ( ) [ ] ^ ' * + - / $
This command does not work across line breaks. To undo a delete word press
Paste.
Delete from cursor to start of line
Deletes all text from the cursor position to the beginning of the line. To
undo this command press Paste.
Delete from cursor to end of line
Seletes all text from the cursor position to the end of the line. To undo
theis command press Paste.
Delete line
Deletes the line cuontaining the cursor and moves any lines below one
line up. To undo a line delete, use Paste.
2.9.1.4 Search and replace Commands
The editor supports search and replace commands that let you search for
strings in the tect and replace them with other strings. Replacement
can optionally be prompted (ask yes/no at each replacement).
Search
Lets you search for a string of up to 45 characters. When you enter this
command, the status line is cleared, and the prompt
search text, text:
appears at the bottom of the Edit window. Enter the string you are looking
for and then press Search again.
The search string can contain any characters, including control chatacters.
To quit the search operation, use the abort command <Esc>.
Search again
Moves the cursor to the next occurrence of the last used search-string.
Replace
This operation works identically to the Find command, except that you can
replace the "found" string with any other string of up to 45 characters.
First, enter the search string and press Replace, the editor prompts you
for the string that will replace the search string. Enter up to 45
characters, press Replace again.
The next prompt (prompt before replacing (y/n)) can be answered Yes or No: y
means you decide whether an occurrence of the string will be replaced, while
n means the editor will replace it automatically.
When the editor finds the items--and of the N option is not specified--it
then positions the cursor at the start of the item, and asks Replace Yes/
No/Rest (y/n/r)? in the prompt line. You can abort the Find/Replace
operation at this point with the Abort command <Esc>. Press the Y-key and
the word at the cursor will be replaced with the replace-string, and the
cursor moves to the next occurrence of the search string. Press the R-key
and this and all subsequent of the search-string on replaced automatically.
Replace again
Finds the next occurrence of the last used search string and pompts for
replacement with the last used replace-string.
Wordstar Search and Replace commends
These four commands is almost identical to the four descrobed above. The
only difference is that the user input is terminated with cr and not the
command-keystroke. This means that it's not possible to search for
newlines.
2.9.1.5 Block Commands
A block of text is any amount of text, from a single character to hundreds
of lines, that has beed surrounded with special block-marker characters.
You can only mark one block in a source text at a time.
Three diffenrent kinds of block-marking commands can be used in the editor,
and the commands are: WordStar-like block commands, MultiMate-like block
commands (The block commands introduced in version 1.x of the SymbMath
editor - ofter referred to as the "old" block commands) and Sprint-like
block commands. The overall concept for each of the three command-
categories can be summarised as follows:
Sprint like commands
Place the cursor at the beginning at the block - press Block select. Now move
the cursor to the bockend (the block will be highlighted as you go). When at
the blockend, select a function to be performed of the block. The block can
be either moved or copied to the paste buffer. Later the content of the paste
buffer can be pasted into the text with the Paste command.
Wordstar like commands
You mark a block by placing a block-begin marker before the first character
and a block-end marker after the last character of the desired portion of
text. Once the block is marked, you can copy, move, or delete it, or write
it to a file.
Multimate like commands
These commands works on the principle that you use the same key to begin
and end a given operation. To abort any block command before it's completed
(when it's waiting for input), just press Esc. For instance, to copy a block
using the block commands, you press MultiMate copy to start the process
(mark the block begin), use the arrow keys to highlight the block, then
press MultiMate copy again to mark the block end. After that, you move the
cursor to the position where the copy. If you want to insert multiple copies
of the marked block, you simply move the cursor with arrow keys to the new
location(s), then press Paste.
Block select
When pressing the Block select command, you enter block markingg mode. The
block will be highlighted as you move (ahead or back from the starting
position). In block marking mode, no characters can be inserted. Pressing
a character key causes the cursor to move to the next occurrence of that
character, Quit block marking mode by pressing <Esc> of Block select again.
Copy block to paste buffer
The currently marked block is copied to the paste beffer. The command
terminates block marking mode, and the previous content of the paste
buffer are overwritten.
Move block to paste buffer
The currently marked block is deleted from the text and moved to the
paste buffer. the command terminate blick marking mode, and the previous
contents of the paste buffer are oberwritten.
Paste
The contents of the paste buffer are inserted in the text at the current
cursor podition. The paste buffer itself is not affected by the command.
Mark blockstart
Marks the beginning of a block. The marker itself is not visible, and the
block itself only becomes visible when the block-end marker is set. Marked
text a block is displayed with a different attribute than the unmarked
text (you can choose the attribute for unmarked text with the menu item
Setup/ Colors/ Edit /Window /Normal Text).
Mark blockend
Marks the end of a block. The marker itself is invisible, and the block
itself becomes visible only when the block-begin marker is also set.
Pressing Mark blockend in block marking mode exit this mode. The block is
still highlighted.
WordStar show/hide block
Causes the visual marking of a block to be alternately switched off and on.
The block manipulation commands copy, move, delete, and write to a file
work only when the block is displayed. Block-related cursor movements jump
to beginning/end of block works both when the block is hidden and displayed.
WordStar copy block
Copies the currently marked block to the paste buffer and then pastes the
contents of the paste buffer at the current cursor position.
MultiMate copy block
Press MultiMate copy block to start the process mark the block begin, use
the arrow keys to highlight the block, then press MultiMate copy block
again to mark the block end. After that, you move the cursor to the
position where the copy is to be insertted, then press MultiMate copy
block once more to insert the copy. If you want to insert multiplw copies
of the marked block, you simply move the cursor with arrow keys to the new
locations, then press Paste.
MultiMate move block
Press MultiMate move block to start the process mark the block beginning,
use the arrow keys to highlight the block, then press MultiMate move block
again to mark the block end. After that, you press MultiMate move block
once more to move the block.
MultiMate delete block
Press MultiMate delete block to start the process mark the block beginning,
use the arrow keys to highlight the block, then press Multimate delete block
again to delete the block.
2.9.1.6 Special block commands
Copy block to printer
Writes previously marked block to the printer. The block is left unchanged
in the current file, and the markers remain in place. If no block is
marked, nothing happens.
Copy block to file
Writes a previously marked block to a file. the block is left unchanged
in the current file, and the markers remain in place. If no block is
marked, nothing happens.
Change case for block
Copy block from file
2.9.1.10 Global Commands
Resize window
Move the window to a new position by holding down the <Shift> key and
pressing the appropriate arrow key in the numeric keypad without Caps
Lock.
Change the size of a window by the arrow keys.
Zoom window
Previous line
File mask
Press this cooamd when the filename browser in the file-name input box is
active. You can then enter the file-mask (e.g. *.sm).
2.9.2 Edit Commands
Within the Input window, press <F8> to open another window,
called the Aux Edit window. In the Auxi Edit window, press <F8> again to
open another Aux Edit window. So you can open many the Aux Edit windows
to edit many files.
Text in the Input window always be saved after exit by pressing
<Esc>. The Aux Edit window is closed with saving by pressing <F10>, or
without saving by pressing <Esc>.
In the Input window or the Aux Edit window, press <F1> to pop-
up the Edit Help menu (see 2.9.1 Edit Help Menu), or <Shift><F1> to see
the manual, and <F7> to copy block from the an Aux Edit window into
the main editor or into the last Aux Edit window.
Move the cursor around in the editor with the arrow
keys, <Page Up>, <Page Down>, and some other keys listed below. The
editor has two typing modes: Insert and Overwrite. In Insert
mode, anything you type is inserted at the cursor position. In
Overwrite mode, pressing a key replaces the current character
at the cursor position with the new typed character. Initially,
the editor operates in Insert mode, to switch modes, press the
<Insert> key or <Ctrl>V. (<Ctrl>V means to hold down the <Ctrl> key
on your keyboard while you press V. The V need not be in upper
case.)
Unlike a more standard word processing program, the editor
does not have word-wrap. You must press <Enter> at the end of each
line.
The editor has an autoindent feature that allows subsequent
lines to automatically indent. If you leave several spaces at the
start of a line, use <Ctrl>OI to indent subsequent lines the same
amount. The command sequence is a toggle, so you need only
press <Ctrl>OI again to stop indenting.
Sometimes you may want to see more than the area covered by
the current window. You can zoom the window, expanding it to the
size of the entire screen, by pressing <F5>. To return the window
to its usual size, press <F5> again. For other window commands,
such as moving and resizing a window, see the window command table,
below.
The editor uses approximately 70 commands, which can be grouped
into 6 main categories:
1. cursor movement commands
2. insert and delete commands
3. search and replace commands
4. file commands
5. block commands
6. miscellaneous commands
Table 2.9.1 Editor commands.
---------------------------------------------------------------
Cursor Movement Commands (move cursor to):
.......................................................
Character left <Ctrl>S or Left arrow <-
Character right <Ctrl>D or Right arrow ->
Word left <Ctrl>A or <Ctrl> <-
Word right <Ctrl>F or <Ctrl> ->
Line up <Ctrl>E or Up arrow
Line down <Ctrl>X or Down arrow
Scroll up <Ctrl>W
Scroll down <Ctrl>Z
Page up <Ctrl>R or <Pg Up>
Page down <Ctrl>C or <Pg Dn>
Beginning of line <Ctrl>QS or <Home>
End of line <Ctrl>QD or <End>
Top of screen <Ctrl>QE or <Ctrl><Home>
Bottom of screen <Ctrl>QX or <Ctrl><End>
Top of file <Ctrl>QR or <Ctrl><Pg Up>
Bottom of file <Ctrl>QC or <Ctrl><Pg Dn>
Beginning of block <Ctrl>QB
End of block <Ctrl>QK
Previous point <Ctrl>QP
Marker 0 <Ctrl>Q0
Marker 1 <Ctrl>Q1
Marker 2 <Ctrl>Q2
Marker 3 <Ctrl>Q3
Set marker 0 <Ctrl>K0
Set marker 1 <Ctrl>K1
Set marker 2 <Ctrl>K2
Set marker 3 <Ctrl>K3
...........................................................
Insert & Delete Commands:
...........................................................
Insert mode on/off <Ctrl>V or <Ins>
Insert line <Ctrl>N
Delete line <Ctrl>Y
Delete to end of line <Ctrl>QY
Delete left character <Ctrl>H or <Backspace>
Delete character under cursor <Ctrl>G or <Del>
Delete right word <Ctrl>T
...........................................................
Block commands:
............................................................
Block selec <Ctrl>KM
Copy block to pastebuffer <Ctrl>KI
Move block to pastebuffer <Ctrl>KY
Paste <Ctrl>U or <Ctrl><F7>
Mark block begin <Ctrl>KB
Mark block end <Ctrl>KK
Mark word <Ctrl>KT
WordStar show/hide block <Ctrl>KH
WoardStar copy block <Ctrl>KC or <Ctrl><F5>
Repeat the last copy <Shift><F5>
WordStar move block <Ctrl>KV or <Alt><F6>
MultiMate copy block <Ctrl><F5>
MultiMate move block <Alt><F6>
MultiMate delete block <Alt><F7>
Delete block <Ctrl>KY
Read block <Ctrl>KR or <F7>
.....................................................................
Special Block functions
....................................................................
Copy block to printer <Ctrl>KP or <Alt><F8>
Copy block to file <Ctrl>KW or <Alt><F5>
Copy block from file <Ctrl>KR or <F7>
Change case for block <Ctrl>KE or <Ctrl><F6>
.....................................................................
Miscellaneous Commands:
.....................................................................
Quit edit <Esc>, <F10>, <Ctrl>KD, or <Ctrl>KQ
Call the auxiliary editor <F8>
Tab <Ctrl>I or <Tab>
Tab mode toggle <Ctrl>OT
Auto indent on/off <Ctrl>OI
Restore line <Ctrl>QL
Find <Ctrl>QF or <Ctrl><F3>
Repeat last find <Ctrl>L or <Shift><F3>
Find & replace <Ctrl>QA or <Ctrl><F4>
Repeat last find & replace <Ctrl>L or <Shift><F4>
Control key prefix <Ctrl>P
Abort operation <Ctrl>U
Restore error message <Ctrl>QW
Search Options:
L Local search
G Global search
N Replace without asking
Y Replace with asking
...................................................................
Global Commands
...................................................................
Resize window <Shift><F10>
Zoom window <F5>
Previous line <F8>
File mask <F4>
Terminate input <F10>
------------------------------------------------------------------
Table 2.9.2 Edit window commands
---------------------------------------------------------------------
Action Key
help <F1>
zoom in window <F5>
zoom out window <F5>
resize window <Shift><F10>, the -><- keys, <F10>
move window <Shift><F10>, <Shift> and the
arrow key in numeric keypad
without Caps Lock
open an Aux Edit window <F8>
close the Aux Edit window with saving <F10>
close the Aux Edit window without saving <Esc>
block copy from an Aux Edit window <F7>
---------------------------------------------------------------------
The content of the status line
--------------------------------------------------------------------------
F1 Help, F2 Save, F3 Open, F4 Replace, F5 Zoom, F7 XCopy, F8 XEdit, F10 End
--------------------------------------------------------------------------
indicates that to press <F1> key to get help.